package com.excu.factory.entity.annotation.auto;






import com.excu.factory.enums.Type;

import java.lang.annotation.*;

/**
 * @author: Joyce
 *  Logic is justice
 * @since: 2022/05/13-- 21:57
 *  实体类自动生成表的列注解
 */
@Documented
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Column {
    String name() default "";
    String length() default "64";
    Type type() default Type.VARCHAR;
    String comment() default "";
    boolean isKey() default false;
    boolean auto() default false;
    boolean isNotNull() default false;
    String defaultValue() default "NULL";
    boolean unique() default false;
    boolean exist() default true;
    int decimal() default -1;
    String[] checkReg() default "";
    boolean isCheck() default false;
}
